//
//  CilckPopView.swift
//  SwiftDemo
//
//  Created by admin on 2020/10/15.
//

import UIKit

class CilckPopView: UIView {

    var toblock       :((_ backAction :Int)->(Void))?


    override init(frame: CGRect) {
        super.init(frame: frame)

//        (frame: CGRect(x: 100, y: 64, width: SCREEN_WIDTH - 200, height: 150))

        let backView: UIView = UIView()
        backView.frame = self.frame
        backView.backgroundColor = HEXCOLOR(c: 0x666666)
        backView.alpha = 0.7
        addSubview(backView)
        let imgClick = UITapGestureRecognizer(target: self, action: #selector(imAction))
        backView.addGestureRecognizer(imgClick)

        let showView: UIView = UIView(frame: CGRect(x: 100, y: 64, width: SCREEN_WIDTH - 200, height: 150))
        showView.backgroundColor = UIColor.red
        addSubview(showView)
    }

    @objc func imAction() {
        toblock!(1)
    }

    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
